//
//  TYZDrawView.h
//  LiaoShenJudicial
//
//  Created by tangbin on 2020/6/22.
//  Copyright © 2020 TangBin. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/*
 DrawView *drawView=[[DrawView alloc] init];
 drawView.frame=CGRectMake(0, 100, self.view.bounds.size.width, 300);
 [self.view addSubview:drawView];
 self.drawView=drawView;
 //设置画板背景颜色
 self.drawView.backgroundColor=[UIColor whiteColor];
 //设置画笔宽度
 self.drawView.lineWidth=5;
 //设置画笔颜色
 self.drawView.lineColor = //self.btn1.backgroundColor;
 */

/// 画 签名 画布 画板
@interface TYZDrawView : UIView

/// 画笔宽度
@property(nonatomic, assign) CGFloat lineWidth;

/// 画笔颜色
@property(nonatomic, strong) UIColor* lineColor;

@property(nonatomic,strong)UIImage* image;

/// 清除画板
- (void)clean;

/// 回退上一步
- (void)undo;

/// 橡皮擦
- (void)eraser;

/// 保存到相册 返回图片
/// @param isSave YES 表示保存到项目；NO 表示 不保存到相册
- (UIImage *)save:(BOOL)isSave;
@end

NS_ASSUME_NONNULL_END
